//
//  FullScreenCollectionCell.m
//  aMoment
//
//  Created by dllo on 15/10/27.
//  Copyright © 2015年 LuckyHan. All rights reserved.
//

#import "FullScreenCollectionCell.h"
#import "AllHeaderFiles.h"

@implementation FullScreenCollectionCell

- (void)dealloc
{
    [_imageView release];
    [super dealloc];
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.imageView = [[UIImageView alloc] init];
        _imageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.contentView addSubview:_imageView];
        [_imageView release];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    _imageView.frame = CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
}

- (void)setImageURL:(NSString *)imageURL
{
    if (_imageURL != imageURL) {
        [_imageURL release];
        _imageURL = [imageURL retain];
    }
    NSLog(@"%@", _imageURL);
    [_imageView setImageWithURL:[NSURL URLWithString:_imageURL] placeholderImage:nil];
}

@end
